<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
	<head>
		<title>共富网亿元礼包大派发 - 共富网</title>
		<jsp:include page="/include/wchat/head.jsp"></jsp:include>
		<link href="/v2/wchat/resrc/css/animate.css?version=20150326213134"
			rel="stylesheet">
		<link href="/v2/wchat/resrc/css/wlc.css" rel="stylesheet">
	</head>
	<body class="cbg">
		<div id="cwrap">
			<div class="banner">
				<span>${fn:substring(username, 0, 2)}***</span> (共富网投资人)
				<br />
				发来的50,000 元理财体验金，赶紧抢吧
			</div>
			
			<c:choose> 
        	<c:when test="${sessionScope.user.userName == username}">
			<div class="elopbox" id="share">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft50" id="valMoney">
					50,000元
				</p>
				<p class="ft24">
					成功抢到${sEnvelopeTreeShareMap.valMoney }元，立即分享红包
					<br>
					邀5位好友一起抢，就能使用了
				</p>
				<a href="javascript:void(0)" id="share_btn" class="button-3"></a>
			</div>
			</c:when>
			<c:otherwise>
			<div class="elopbox" id="join">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft50">
					50,000元
				</p>
				<p class="ft24">
					共富网红包大派发
					<br>
					送理财体验金红包
				</p>
				<div class="iptbox">
					<input id="senvKey" type="hidden" value="${param.param }" >
					<input class="size14" id="input_tel" maxlength="11" placeholder="请输入手机号"><br/>
				</div>
				<a href="javascript:void(0)" id="receive_btn" class="button-2"></a>
			</div>
			</c:otherwise>	
			</c:choose>		
			
			
			<div class="elopbox" id="hasReceived" style="display: none;">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft50" id="valMoney">
					50,000元
				</p>
				<p class="ft24" id="hasReceivedMsg">
					你已抢过该红包
					<br>
					抢到金额为2838元
				</p>
				<a href="/getRedEnvelopesInit.do" id="hr_tyj_btn" class="button-6"></a>
				<a href="javascript:void(0)" id="share_btn" class="button-3"></a>
			</div>

			<div class="elopbox" id="successReceived" style="display: none;">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft50" id="valMoney">
					50,000元
				</p>
				<p class="ft24" id="successReceivedMsg">
					成功抢到2888元，立即使用
					<br>
					收益全归你
				</p>
				<a href="/wchatEliteInvestIndex.do" id="tyj_btn" class="button-6"></a>
			</div>
			
			<div class="elopbox" id="registerReceived" style="display: none;">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft50" id="valMoney">
					50,000元
				</p>
				<p class="ft24" id="registerReceivedMsg">
					成功抢到2888元，立即使用
					<br>
					收益全归你
				</p>
				<a href="/getRedEnvelopesInit.do" id="register_btn" class="button-6"></a>
				<a href="javascript:void(0)" id="share_btn" style="margin-top:5px;" class="button-3"></a>
			</div>

			<!--红包过期-->
			<div class="elopbox" id="envelopeDead" style="display: none;">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft48">
					亲，该红包已过期
					<br />
					不能再抢，试试其他的吧
				</p>
			</div>
			
			<div class="elopbox" id="envelopeOver" style="display: none;">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft48">
					亲，该红包已抢完
					<br />
					不能再抢，试试其他的吧
				</p>
			</div>
			
			<div class="elopbox" id="LimitExceeded" style="display: none;">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft48">
					亲，您已超抢红包限额
					<br />
					不能再抢，试试其他的吧
				</p>
			</div>
			
			<div class="elopbox" id="envelopeEnd" style="display: none;">
				<p class="pg165">
					<img src="/v2/wchat/resrc/img/event/wlcShare/loge.png" width="150"
						height="51">
				</p>
				<p class="ft48">
					亲，亿元红包已领完
					<br />
					请期待下次活动
				</p>
			</div>

			<div class="jTabs">
				<ul id="investTabs">
					<li class="jTab current" id="borrowerDetailsBtn">
						朋友手气
					</li>
					<li class="jTab jLine">
						活动规则
					</li>
					<li class="jTab">
						了解共富
					</li>
				</ul>
			</div>
			<div id="investPanel" class="model-auto">
				<div class="jPanel" style="display: block">
					<ul class="Ac_meg">
						<s:if test="#request.spliteEnvelopeTreeList.size>0">
							<s:iterator value="#request.spliteEnvelopeTreeList"
								var="spliteEnvelopeTree">
								<li>
									<span class="u_meg">
										<p>
											<b>${fn:substring(spliteEnvelopeTree.username, 0, 2)}***</b>
											<em>${spliteEnvelopeTree.createTimeFormat }</em>
										</p>
										<p class="answer_msg">
											世界这么大，抢完红包，我就有money出去走走了
										</p>
									</span>
									<span class="g_money"><fmt:formatNumber
											value="${spliteEnvelopeTree.valMoney }"
											pattern="###" />元</span>
								</li>
							</s:iterator>
						</s:if>
						<s:else>
							<li>
								暂无数据
							</li>
						</s:else>
					</ul>
				</div>
				<div class="jPanel" style="display: none">
					<ul class="activity">
						<li>
							用户分享50,000元红包到朋友圈，让朋友们一起抢红包，至少6人参与，才算抢红包成功
						</li>
						<li>
							帮抢红包的用户，抢红包成功后，将随机得到50,000元红包中的一定金额作为理财体验金奖励，奖励会放在抢红包时输入的手机号所对应的共富网账户中
						</li>
						<li>
							需在30天内使用体验金，过期则由共富网收回
						</li>
					</ul>
					<p>
						<a class="line_l"
							href="/v2/wchat/appCommon/event/wlcShare/index.jsp">查看详细规则</a>
						<a class="line_r" href="/wlcShare.do">我也发红包</a>
					</p>
				</div>
				<div class="jPanel" style="display: none">
					<ul class="activity">
						<li>
							共富网是首家由国有保险公司全程保驾护航的科技金融平台
						</li>
						<li>
							年化收益最高18%，是银行活期收益的50倍
						</li>
						<li>
							已有4万人加入，交易额超过5亿元，为投资人创收超千万元
						</li>
					</ul>
					<p>
						<a class="line_l" href="/v2/wchat/appCommon/event/index.jsp">关于我们</a>

					</p>
				</div>
			</div>
			<div class="share-layer">
				<div></div>
			</div>
		</div>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script src="/v2/wchat/resrc/js/wlc.js" type="text/javascript"></script>
<script>
    wx.config({
        debug: false,
        appId: '${wxConfigMap.appId}',
        timestamp: ${wxConfigMap.timestamp},
        nonceStr: '${wxConfigMap.nonceStr}',
        signature: '${wxConfigMap.signature}',
        jsApiList: [
            // 所有要调用的 API 都要加到这个列表中
            'showOptionMenu',
            'onMenuShareTimeline',
            'onMenuShareAppMessage'
        ]
    });

    wx.ready(function () {
    	wx.showOptionMenu();

    	wx.onMenuShareAppMessage({
            title: '共富网亿元礼包大派发，快来抢！',
            desc: '共富网亿元礼包大派发，你敢来，我就发，拼人气，拼人品！',
            link: 'http://www.tea1.cn/wlcShareInfo.do?param=${param.param}',
            imgUrl: 'http://www.tea1.cn/v2/wchat/resrc/img/event/wlcShare/coupon.jpg'
        });

        wx.onMenuShareTimeline({
            title: '共富网亿元礼包大派发，快来抢！',
            link: 'http://www.tea1.cn/wlcShareInfo.do?param=${param.param}',
            imgUrl: 'http://www.tea1.cn/v2/wchat/resrc/img/event/wlcShare/coupon.jpg'
        });
    });
</script>
	</body>
</html>